package ithema.StringBuider;

public class StringBuilderDemo4 {
    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder();
        //容量 最多装了多少
        //长度 已经装了多少
        System.out.println(sb.capacity());//默认是16容量
        System.out.println(sb.length());
        sb.append("abcdefghijklmnopqrstuvwxyz");
        System.out.println(sb.capacity());//16*2+2
        System.out.println(sb.length());
        //超出了 实际长度为准
        sb.append("abcdefghijklmnopqrstuvwxyz562252648564");
        System.out.println(sb.capacity());
        System.out.println(sb.length());


    }
}
